
#ifndef __MAIN_H
#define __MAIN_H
#include <stdio.h>

#include "misc.h"
#include "core_cm3.h"

// idk wth
#include <stdio.h>
#include <stdarg.h>
#include <string.h>

// stm includes
#include "stm32f10x.h"
#include "stm32f10x_usart.h"
#include "stm32f10x_gpio.h"
#include "stm32f10x_rcc.h"
#include "stm32f10x_crc.h" // todo turn this off and stop using! or fix in java !
#include "stm32f10x_tim.h"
#include "stm32f10x_dma.h"
#include "stm32f10x_i2c.h"
#include "stm32f10x_exti.h"
#include "stm32f10x_spi.h"


// global structs used across modules ! 
#include "zbStructs.h"

// our includes
#include "zbComm.h"
#include "zbProtocol.h"
#include "zbControl.h"
#include "zbPWM.h"
#include "zbUtils.h"
#include "zbControl.h"
#include "zbTime.h"
#include "zbI2C.h"
#include "zbADC.h"
#include "zbGPIO.h"
//#include "zbnRF24L01.h"
//#include "RFM70.H"
#include "unitTest.h"


// really global vars 
// global for real
extern struct glbVars *newgVars; // new stuff from client
extern struct glbVars *mygVars;	 // what we send to client and use

#ifdef __GNUC__
  /* With GCC/RAISONANCE, small printf (option LD Linker->Libraries->Small printf
     set to 'Yes') calls __io_putchar() */
  #define PUTCHAR_PROTOTYPE int __io_putchar(int ch)
#else
  #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)
#endif /* __GNUC__ */
#endif
